package day06.text02;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;


public class Anno {
    public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException {
        Class<?> aClass = Class.forName("day06.text02.UserTest");

        Method[] methods = aClass.getMethods();
        for (Method method : methods) {
            if(method.isAnnotationPresent(Test.class)){
                Object o = aClass.newInstance();
                method.invoke(o);
            }
        }

    }
    }
